home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / jazlib.arc / SHELL.ASM < prev    next >
Assembly Source File  |  1988-12-18  |  1KB  |  62 lines

  1.  
  2. Comment *
  3. ┌────────────────────────────────────────────────────────────────────────────┐
  4. │                                         │
  5. │                                         │
  6. │                                         │
  7. │                                         │
  8. │                                         │
  9. │                                         │
  10. │                                         │
  11. │                                         │
  12. │                                         │
  13. │                                         │
  14. │ (C) JazSoft Software by Jack A. Zucker (301) 794-5950              │
  15. └────────────────────────────────────────────────────────────────────────────┘
  16. *
  17.  
  18. ;=============================================================================
  19. ;                    Data
  20. ;=============================================================================
  21.  
  22. DGROUP    group    _DATA
  23. _DATA    segment word public 'DATA'
  24.     assume    ds:DGROUP
  25.  
  26.     ; Your Data goes here . . .
  27.  
  28. _DATA    ends
  29.  
  30. ;=============================================================================
  31. ;                   Code
  32. ;=============================================================================
  33.  
  34.     assume cs:_text
  35. _text    segment public byte 'code'
  36.     PUBLIC _shell
  37.  
  38. _shell        proc near
  39.  
  40.     push bp             ; save base of stack
  41.     mov bp,sp            ; establish stack frame
  42.  
  43.     push si             ; save MS-C's Register vars
  44.     push di             ; save MS-C's Register vars
  45.     push ds             ; save data and extra segs
  46.     push es
  47.  
  48.     ; user code goes here
  49.  
  50.     pop es                ; restore data and extra segs
  51.     pop ds
  52.     pop di                ; Restore MS-C's Register vars
  53.     pop si                ; Restore MS-C's Register vars
  54.  
  55.     mov sp,bp            ; restore stack pointer
  56.     pop  bp             ; and base of stack
  57.     ret                ; return to caller
  58.  
  59. _shell        endp
  60. _text    ends
  61. end
  62.